#{extends 'main.html' /}
#{set title:'Gelen İstekler' /}


<div class="message_menu">
<a href="/comingrequests" class="message_menu_a_active">Gelen İstekler</a> 
<a href="/sentrequests" class="message_menu_a">Gönderilen İstekler</a> 
</div>

<div class="message_top">

<div class="message_sender">
Kimden
</div>

<div class="message_subject_req">
Seyahat
</div>

<div class="message_date_req">
Durum
</div>

</div>


<div class="message_list">
#{list items:user?.comingRequests, as:'cr'}
#{if !cr?.checked}
<div class="message_list_row">

<div class="message_list_sender">
<a href="/profile/${cr.requester.id}" style="color: black; font-family: none;">${cr?.requester?.name}</a>
</div>

<div class="message_list_subject_req">
<a href="/driverjourneydetails/${cr.journey.id}" style="color: black; font-family: none;">${cr?.journey?.departurestate} --> ${cr?.journey?.arrivestate} | ${cr?.journey?.departuredate?.format('dd/MM/yyyy')}</a>
</div>

<div class="message_list_date_req">
<a href="@{Requests.acceptrequest(cr?.id)}" style="color: black; font-family: none;">Kabul et</a> | <a href="@{Requests.rejectrequest(cr?.id)}" style="color: black; font-family: none;">Reddet</a>
</div>

</div>
#{/if}
#{/list}
</div>